Load genome from genbank and create Karyotype


In [1]:
from pyrcos import utils
from Bio import SeqIO

In [2]:
record = SeqIO.read("../data/MG1655.gb", "gb")
karyotype = utils.convert_seq_records([record], feature_types=[])

In [3]:
print(karyotype)


chr - NC_000913.3 NC_000913 0 4641652 white

Load PaxDb Dataset


In [4]:
from pyrcos.datasets import protein_abundance

In [37]:
abundance = protein_abundance.read_paxdb("../data/paxdb.ecoli.integrated.txt")
positions = {f.qualifiers["locus_tag"][0]: [f.location.start, f.location.end, record.id] 
             for f in record.features if f.type == "gene"}

abundance_file = protein_abundance.convert_abundance_to_file(abundance, positions)

Create circos objects


In [20]:
from pyrcos.objects import Circos, Heatmap, Ideogram

In [33]:
heatmap = Heatmap(abundance_file, "1.1r", "1.15r")
circos = Circos(karyotype, plots=heatmap, circos_path="/Users/joao/Documents/circos-0.67-7/")

In [34]:
circos


/Users/joao/Documents/circos-0.67-7/bin/circos -config /var/folders/l3/z9lkd79n7slblqm475s3l2vw0000gn/T/tmpL4mZ7j -svg -dir /var/folders/l3/z9lkd79n7slblqm475s3l2vw0000gn/T -file tmpaDxG5G
Out[34]:
<pyrcos.objects.Circos at 0x1122adad0>

In [ ]: